package com.kfirszt.elearning.struts.actions.autocomplete;

import java.util.ArrayList;
import java.util.List;

import com.kfirszt.elearning.base.BaseAction;
import com.kfirszt.elearning.persistence.model.City;

public class CityAutocompleteAction extends BaseAction {

	private static final long serialVersionUID = 1L;
	
	private List<City> json = new ArrayList<City>();
	
	private String term;

	@Override
	public String execute() throws Exception {
		json=cityService.findByName(term);
		return "autocomplete";
	}

	public String getTerm() {
		return term;
	}

	public void setTerm(String term) {
		this.term = term;
	}

	public List<City> getJson() {
		return json;
	}

	public void setJson(List<City> json) {
		this.json = json;
	}

}
